package com.jintoufs.service.customer;

import com.jintoufs.domain.customer.CustomerResource;
import com.jintoufs.util.ztree.TreeNode;

import java.util.List;
import java.util.Map;

public interface CustomerResourceService {

    /**
     * 根据roleId获取资源
     *
     * @param roleId 权限ID
     */


    List<CustomerResource> selectByRole(Integer roleId);

    boolean isMenu(Map<String, Object> params);


    /**
     * 保存资源
     *
     * @return
     */
    Map<String, Object> save(CustomerResource resource);

    /**
     * 查询资源列表
     */
    List<CustomerResource> findByParams(Map<String, Object> params);

    void delete(Integer id);

    /**
     * 根据roleId删除资源
     *
     * @param roleId
     */
    void deleteResourceByRole(Integer roleId);



    /**
     * 保存角色和资源关联关系
     *
     * @param roleId
     */
    void saveRoleResource(Integer roleId, Integer resourceId);

    List<TreeNode> getModuleTree(CustomerResource entity);

    List<TreeNode> getResourceTreeByRole(Integer id);

    void deleteResourceById(Integer id);

    List<Object> getResourceTreeList(List<CustomerResource> entity);
}
